﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LinFu.IoC.Configuration;

namespace CoreEx.DynamicInvoker.Implementation
{
    [Implements(typeof(IParameterTypeResolver))]
    public class ParameterTypeResolver : IParameterTypeResolver
    {
        public Type[] GetTypes(object[] arguments)
        {
            if (arguments == null || arguments.Length == 0)
                return new Type[]{};            
            return arguments.Select(a => a == null ? typeof (object) : a.GetType()).ToArray();
        }
    }
}
